#include <bits/stdc++.h>

#define ll long long
#define ull unsigned long long
#define uint unsigned int

#define YES cout << "Yes" << '\n'
#define NO cout << "No" << '\n'
#define endl '\n'
const int INF = 1e9;
const int MOD = 1;
using namespace std;
/*思考
 *用覆盖操作来删除数组内元素，尽可能让数组内元素不连续，计算可不连续的数量
 */

void solve()
{
    int n = 0;
    cin >> n;
    vector<int> a(n + 1);
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    int ans = 1;
    for (int i = 2; i <= n; i++) {
        if (a[i] > a[i - 1] + 1) {
            ans++;
        }
        else {
            a[i] = a[i - 1];
        }
    }
    cout << ans << endl;
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t = 0;
    cin >> t;
    while (t--)
        solve();
    return 0;
}